from django.db import models


class BaseModels(models.Model):
    """ 抽象模型类 """
    createTime = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")
    updateTime = models.DateTimeField(auto_now=True, verbose_name="更新时间")

    class Meta:
        abstract = True


class IntegerChoices(models.IntegerChoices):

    @classmethod
    def list(cls):
        return cls.values

        # return tuple(map(lambda x: x[0], cls.choices))
